//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS B2bi service.
///
/// This is the Amazon Web Services B2B Data Interchange API Reference. It provides descriptions, API request parameters, and the XML response for each of the B2BI API actions. B2BI enables automated exchange of EDI (electronic data interchange) based business-critical transactions at cloud scale, with elasticity and pay-as-you-go pricing. Businesses use EDI documents to exchange transactional data with trading partners, such as suppliers and end customers, using standardized formats such as X12.  Rather than actually running a command, you can use the --generate-cli-skeleton parameter with any API call to generate and display a parameter template. You can then use the generated template to customize and use as input on a later command. For details, see Generate and use a parameter skeleton file.
public struct B2bi: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the B2bi client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "B2BI",
            serviceName: "B2bi",
            serviceIdentifier: "b2bi",
            serviceProtocol: .json(version: "1.0"),
            apiVersion: "2022-06-23",
            endpoint: endpoint,
            errorType: B2biErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Instantiates a capability based on the specified parameters. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    @Sendable
    @inlinable
    public func createCapability(_ input: CreateCapabilityRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateCapabilityResponse {
        try await self.client.execute(
            operation: "CreateCapability", 
            path: "/capabilities", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Instantiates a capability based on the specified parameters. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    ///
    /// Parameters:
    ///   - clientToken: Reserved for future use.
    ///   - configuration: Specifies a structure that contains the details for a capability.
    ///   - instructionsDocuments: Specifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document's location.
    ///   - name: Specifies the name of the capability, used to identify it.
    ///   - tags: Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
    ///   - type: Specifies the type of the capability. Currently, only edi is supported.
    ///   - logger: Logger use during operation
    @inlinable
    public func createCapability(
        clientToken: String? = CreateCapabilityRequest.idempotencyToken(),
        configuration: CapabilityConfiguration,
        instructionsDocuments: [S3Location]? = nil,
        name: String,
        tags: [Tag]? = nil,
        type: CapabilityType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateCapabilityResponse {
        let input = CreateCapabilityRequest(
            clientToken: clientToken, 
            configuration: configuration, 
            instructionsDocuments: instructionsDocuments, 
            name: name, 
            tags: tags, 
            type: type
        )
        return try await self.createCapability(input, logger: logger)
    }

    /// Creates a partnership between a customer and a trading partner, based on the supplied parameters. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    @Sendable
    @inlinable
    public func createPartnership(_ input: CreatePartnershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreatePartnershipResponse {
        try await self.client.execute(
            operation: "CreatePartnership", 
            path: "/partnerships", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a partnership between a customer and a trading partner, based on the supplied parameters. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    ///
    /// Parameters:
    ///   - capabilities: Specifies a list of the capabilities associated with this partnership.
    ///   - capabilityOptions: Specify the structure that contains the details for the associated capabilities.
    ///   - clientToken: Reserved for future use.
    ///   - email: Specifies the email address associated with this trading partner.
    ///   - name: Specifies a descriptive name for the partnership.
    ///   - phone: Specifies the phone number associated with the partnership.
    ///   - profileId: Specifies the unique, system-generated identifier for the profile connected to this partnership.
    ///   - tags: Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
    ///   - logger: Logger use during operation
    @inlinable
    public func createPartnership(
        capabilities: [String],
        capabilityOptions: CapabilityOptions? = nil,
        clientToken: String? = CreatePartnershipRequest.idempotencyToken(),
        email: String,
        name: String,
        phone: String? = nil,
        profileId: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreatePartnershipResponse {
        let input = CreatePartnershipRequest(
            capabilities: capabilities, 
            capabilityOptions: capabilityOptions, 
            clientToken: clientToken, 
            email: email, 
            name: name, 
            phone: phone, 
            profileId: profileId, 
            tags: tags
        )
        return try await self.createPartnership(input, logger: logger)
    }

    /// Creates a customer profile. You can have up to five customer profiles, each representing a distinct private network. A profile is the mechanism used to create the concept of a private network.
    @Sendable
    @inlinable
    public func createProfile(_ input: CreateProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateProfileResponse {
        try await self.client.execute(
            operation: "CreateProfile", 
            path: "/profiles", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a customer profile. You can have up to five customer profiles, each representing a distinct private network. A profile is the mechanism used to create the concept of a private network.
    ///
    /// Parameters:
    ///   - businessName: Specifies the name for the business associated with this profile.
    ///   - clientToken: Reserved for future use.
    ///   - email: Specifies the email address associated with this customer profile.
    ///   - logging: Specifies whether or not logging is enabled for this profile.
    ///   - name: Specifies the name of the profile.
    ///   - phone: Specifies the phone number associated with the profile.
    ///   - tags: Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
    ///   - logger: Logger use during operation
    @inlinable
    public func createProfile(
        businessName: String,
        clientToken: String? = CreateProfileRequest.idempotencyToken(),
        email: String? = nil,
        logging: Logging,
        name: String,
        phone: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateProfileResponse {
        let input = CreateProfileRequest(
            businessName: businessName, 
            clientToken: clientToken, 
            email: email, 
            logging: logging, 
            name: name, 
            phone: phone, 
            tags: tags
        )
        return try await self.createProfile(input, logger: logger)
    }

    /// Amazon Web Services B2B Data Interchange uses a mapping template in JSONata or XSLT format to transform a customer input file into a JSON or XML file that can be converted to EDI. If you provide a sample EDI file with the same structure as the EDI files that you wish to generate, then the service can generate a mapping template. The starter template contains placeholder values which you can replace with JSONata or XSLT expressions to take data from your input file and insert it into the JSON or XML file that is used to generate the EDI. If you do not provide a sample EDI file, then the service can generate a mapping template based on the EDI settings in the templateDetails parameter.   Currently, we only support generating a template that can generate the input to produce an Outbound X12 EDI file.
    @Sendable
    @inlinable
    public func createStarterMappingTemplate(_ input: CreateStarterMappingTemplateRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateStarterMappingTemplateResponse {
        try await self.client.execute(
            operation: "CreateStarterMappingTemplate", 
            path: "/createmappingstarttemplate", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Amazon Web Services B2B Data Interchange uses a mapping template in JSONata or XSLT format to transform a customer input file into a JSON or XML file that can be converted to EDI. If you provide a sample EDI file with the same structure as the EDI files that you wish to generate, then the service can generate a mapping template. The starter template contains placeholder values which you can replace with JSONata or XSLT expressions to take data from your input file and insert it into the JSON or XML file that is used to generate the EDI. If you do not provide a sample EDI file, then the service can generate a mapping template based on the EDI settings in the templateDetails parameter.   Currently, we only support generating a template that can generate the input to produce an Outbound X12 EDI file.
    ///
    /// Parameters:
    ///   - mappingType: Specify the format for the mapping template: either JSONATA or XSLT.
    ///   - outputSampleLocation: Specify the location of the sample EDI file that is used to generate the mapping template.
    ///   - templateDetails:  Describes the details needed for generating the template. Specify the X12 transaction set and version for which the template is used: currently, we only support X12.
    ///   - logger: Logger use during operation
    @inlinable
    public func createStarterMappingTemplate(
        mappingType: MappingType,
        outputSampleLocation: S3Location? = nil,
        templateDetails: TemplateDetails,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateStarterMappingTemplateResponse {
        let input = CreateStarterMappingTemplateRequest(
            mappingType: mappingType, 
            outputSampleLocation: outputSampleLocation, 
            templateDetails: templateDetails
        )
        return try await self.createStarterMappingTemplate(input, logger: logger)
    }

    /// Creates a transformer. Amazon Web Services B2B Data Interchange currently supports two scenarios:    Inbound EDI: the Amazon Web Services customer receives an EDI file from their trading partner. Amazon Web Services B2B Data Interchange converts this EDI file into a JSON or XML file with a service-defined structure. A mapping template provided by the customer, in JSONata or XSLT format, is optionally applied to this file to produce a JSON or XML file with the structure the customer requires.    Outbound EDI: the Amazon Web Services customer has a JSON or XML file containing data that they wish to use in an EDI file. A mapping template, provided by the customer (in either JSONata or XSLT format) is applied to this file to generate a JSON or XML file in the service-defined structure. This file is then converted to an EDI file.    The following fields are provided for backwards compatibility only: fileFormat, mappingTemplate, ediType, and sampleDocument.   Use the mapping data type in place of mappingTemplate and fileFormat    Use the sampleDocuments data type in place of sampleDocument    Use either the inputConversion or outputConversion in place of ediType
    @Sendable
    @inlinable
    public func createTransformer(_ input: CreateTransformerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateTransformerResponse {
        try await self.client.execute(
            operation: "CreateTransformer", 
            path: "/transformers", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a transformer. Amazon Web Services B2B Data Interchange currently supports two scenarios:    Inbound EDI: the Amazon Web Services customer receives an EDI file from their trading partner. Amazon Web Services B2B Data Interchange converts this EDI file into a JSON or XML file with a service-defined structure. A mapping template provided by the customer, in JSONata or XSLT format, is optionally applied to this file to produce a JSON or XML file with the structure the customer requires.    Outbound EDI: the Amazon Web Services customer has a JSON or XML file containing data that they wish to use in an EDI file. A mapping template, provided by the customer (in either JSONata or XSLT format) is applied to this file to generate a JSON or XML file in the service-defined structure. This file is then converted to an EDI file.    The following fields are provided for backwards compatibility only: fileFormat, mappingTemplate, ediType, and sampleDocument.   Use the mapping data type in place of mappingTemplate and fileFormat    Use the sampleDocuments data type in place of sampleDocument    Use either the inputConversion or outputConversion in place of ediType
    ///
    /// Parameters:
    ///   - clientToken: Reserved for future use.
    ///   - inputConversion: Specify the InputConversion object, which contains the format options for the inbound transformation.
    ///   - mapping: Specify the structure that contains the mapping template and its language (either XSLT or JSONATA).
    ///   - name: Specifies the name of the transformer, used to identify it.
    ///   - outputConversion: A structure that contains the OutputConversion object, which contains the format options for the outbound transformation.
    ///   - sampleDocuments: Specify a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.
    ///   - tags: Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
    ///   - logger: Logger use during operation
    @inlinable
    public func createTransformer(
        clientToken: String? = CreateTransformerRequest.idempotencyToken(),
        inputConversion: InputConversion? = nil,
        mapping: Mapping? = nil,
        name: String,
        outputConversion: OutputConversion? = nil,
        sampleDocuments: SampleDocuments? = nil,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateTransformerResponse {
        let input = CreateTransformerRequest(
            clientToken: clientToken, 
            inputConversion: inputConversion, 
            mapping: mapping, 
            name: name, 
            outputConversion: outputConversion, 
            sampleDocuments: sampleDocuments, 
            tags: tags
        )
        return try await self.createTransformer(input, logger: logger)
    }

    /// Deletes the specified capability. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    @Sendable
    @inlinable
    public func deleteCapability(_ input: DeleteCapabilityRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteCapability", 
            path: "/capabilities/{capabilityId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified capability. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    ///
    /// Parameters:
    ///   - capabilityId: Specifies a system-assigned unique identifier for the capability.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteCapability(
        capabilityId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteCapabilityRequest(
            capabilityId: capabilityId
        )
        return try await self.deleteCapability(input, logger: logger)
    }

    /// Deletes the specified partnership. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    @Sendable
    @inlinable
    public func deletePartnership(_ input: DeletePartnershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeletePartnership", 
            path: "/partnerships/{partnershipId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified partnership. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    ///
    /// Parameters:
    ///   - partnershipId: Specifies the unique, system-generated identifier for a partnership.
    ///   - logger: Logger use during operation
    @inlinable
    public func deletePartnership(
        partnershipId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeletePartnershipRequest(
            partnershipId: partnershipId
        )
        return try await self.deletePartnership(input, logger: logger)
    }

    /// Deletes the specified profile. A profile is the mechanism used to create the concept of a private network.
    @Sendable
    @inlinable
    public func deleteProfile(_ input: DeleteProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteProfile", 
            path: "/profiles/{profileId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified profile. A profile is the mechanism used to create the concept of a private network.
    ///
    /// Parameters:
    ///   - profileId: Specifies the unique, system-generated identifier for the profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteProfile(
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteProfileRequest(
            profileId: profileId
        )
        return try await self.deleteProfile(input, logger: logger)
    }

    /// Deletes the specified transformer. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
    @Sendable
    @inlinable
    public func deleteTransformer(_ input: DeleteTransformerRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteTransformer", 
            path: "/transformers/{transformerId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified transformer. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
    ///
    /// Parameters:
    ///   - transformerId: Specifies the system-assigned unique identifier for the transformer.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteTransformer(
        transformerId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteTransformerRequest(
            transformerId: transformerId
        )
        return try await self.deleteTransformer(input, logger: logger)
    }

    /// Takes sample input and output documents and uses Amazon Bedrock to generate a mapping automatically. Depending on the accuracy and other factors, you can then edit the mapping for your needs.  Before you can use the AI-assisted feature for Amazon Web Services B2B Data Interchange you must enable models in Amazon Bedrock. For details, see AI-assisted template mapping prerequisites in the Amazon Web Services B2B Data Interchange User guide.  To generate a mapping, perform the following steps:   Start with an X12 EDI document to use as the input.   Call TestMapping using your EDI document.   Use the output from the TestMapping operation as either input or output for your GenerateMapping call, along with your sample file.
    @Sendable
    @inlinable
    public func generateMapping(_ input: GenerateMappingRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GenerateMappingResponse {
        try await self.client.execute(
            operation: "GenerateMapping", 
            path: "/generate-mapping", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Takes sample input and output documents and uses Amazon Bedrock to generate a mapping automatically. Depending on the accuracy and other factors, you can then edit the mapping for your needs.  Before you can use the AI-assisted feature for Amazon Web Services B2B Data Interchange you must enable models in Amazon Bedrock. For details, see AI-assisted template mapping prerequisites in the Amazon Web Services B2B Data Interchange User guide.  To generate a mapping, perform the following steps:   Start with an X12 EDI document to use as the input.   Call TestMapping using your EDI document.   Use the output from the TestMapping operation as either input or output for your GenerateMapping call, along with your sample file.
    ///
    /// Parameters:
    ///   - inputFileContent: Provide the contents of a sample X12 EDI file, either in JSON or XML format, to use as a starting point for the mapping.
    ///   - mappingType: Specify the mapping type: either JSONATA or XSLT.
    ///   - outputFileContent: Provide the contents of a sample X12 EDI file, either in JSON or XML format, to use as a target for the mapping.
    ///   - logger: Logger use during operation
    @inlinable
    public func generateMapping(
        inputFileContent: String,
        mappingType: MappingType,
        outputFileContent: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GenerateMappingResponse {
        let input = GenerateMappingRequest(
            inputFileContent: inputFileContent, 
            mappingType: mappingType, 
            outputFileContent: outputFileContent
        )
        return try await self.generateMapping(input, logger: logger)
    }

    /// Retrieves the details for the specified capability. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    @Sendable
    @inlinable
    public func getCapability(_ input: GetCapabilityRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetCapabilityResponse {
        try await self.client.execute(
            operation: "GetCapability", 
            path: "/capabilities/{capabilityId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the details for the specified capability. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    ///
    /// Parameters:
    ///   - capabilityId: Specifies a system-assigned unique identifier for the capability.
    ///   - logger: Logger use during operation
    @inlinable
    public func getCapability(
        capabilityId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetCapabilityResponse {
        let input = GetCapabilityRequest(
            capabilityId: capabilityId
        )
        return try await self.getCapability(input, logger: logger)
    }

    /// Retrieves the details for a partnership, based on the partner and profile IDs specified. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    @Sendable
    @inlinable
    public func getPartnership(_ input: GetPartnershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetPartnershipResponse {
        try await self.client.execute(
            operation: "GetPartnership", 
            path: "/partnerships/{partnershipId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the details for a partnership, based on the partner and profile IDs specified. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    ///
    /// Parameters:
    ///   - partnershipId: Specifies the unique, system-generated identifier for a partnership.
    ///   - logger: Logger use during operation
    @inlinable
    public func getPartnership(
        partnershipId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetPartnershipResponse {
        let input = GetPartnershipRequest(
            partnershipId: partnershipId
        )
        return try await self.getPartnership(input, logger: logger)
    }

    /// Retrieves the details for the profile specified by the profile ID. A profile is the mechanism used to create the concept of a private network.
    @Sendable
    @inlinable
    public func getProfile(_ input: GetProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetProfileResponse {
        try await self.client.execute(
            operation: "GetProfile", 
            path: "/profiles/{profileId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the details for the profile specified by the profile ID. A profile is the mechanism used to create the concept of a private network.
    ///
    /// Parameters:
    ///   - profileId: Specifies the unique, system-generated identifier for the profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func getProfile(
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetProfileResponse {
        let input = GetProfileRequest(
            profileId: profileId
        )
        return try await self.getProfile(input, logger: logger)
    }

    /// Retrieves the details for the transformer specified by the transformer ID. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
    @Sendable
    @inlinable
    public func getTransformer(_ input: GetTransformerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetTransformerResponse {
        try await self.client.execute(
            operation: "GetTransformer", 
            path: "/transformers/{transformerId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the details for the transformer specified by the transformer ID. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
    ///
    /// Parameters:
    ///   - transformerId: Specifies the system-assigned unique identifier for the transformer.
    ///   - logger: Logger use during operation
    @inlinable
    public func getTransformer(
        transformerId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetTransformerResponse {
        let input = GetTransformerRequest(
            transformerId: transformerId
        )
        return try await self.getTransformer(input, logger: logger)
    }

    /// Returns the details of the transformer run, based on the Transformer job ID.  If 30 days have elapsed since your transformer job was started, the system deletes it. So, if you run GetTransformerJob and supply a transformerId and transformerJobId for a job that was started more than 30 days previously, you receive a 404 response.
    @Sendable
    @inlinable
    public func getTransformerJob(_ input: GetTransformerJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetTransformerJobResponse {
        try await self.client.execute(
            operation: "GetTransformerJob", 
            path: "/transformer-jobs/{transformerJobId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the details of the transformer run, based on the Transformer job ID.  If 30 days have elapsed since your transformer job was started, the system deletes it. So, if you run GetTransformerJob and supply a transformerId and transformerJobId for a job that was started more than 30 days previously, you receive a 404 response.
    ///
    /// Parameters:
    ///   - transformerId: Specifies the system-assigned unique identifier for the transformer.
    ///   - transformerJobId: Specifies the unique, system-generated identifier for a transformer run.
    ///   - logger: Logger use during operation
    @inlinable
    public func getTransformerJob(
        transformerId: String,
        transformerJobId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetTransformerJobResponse {
        let input = GetTransformerJobRequest(
            transformerId: transformerId, 
            transformerJobId: transformerJobId
        )
        return try await self.getTransformerJob(input, logger: logger)
    }

    /// Lists the capabilities associated with your Amazon Web Services account for your current or specified region. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    @Sendable
    @inlinable
    public func listCapabilities(_ input: ListCapabilitiesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListCapabilitiesResponse {
        try await self.client.execute(
            operation: "ListCapabilities", 
            path: "/capabilities", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the capabilities associated with your Amazon Web Services account for your current or specified region. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    ///
    /// Parameters:
    ///   - maxResults: Specifies the maximum number of capabilities to return.
    ///   - nextToken: When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.
    ///   - logger: Logger use during operation
    @inlinable
    public func listCapabilities(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListCapabilitiesResponse {
        let input = ListCapabilitiesRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listCapabilities(input, logger: logger)
    }

    /// Lists the partnerships associated with your Amazon Web Services account for your current or specified region. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    @Sendable
    @inlinable
    public func listPartnerships(_ input: ListPartnershipsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListPartnershipsResponse {
        try await self.client.execute(
            operation: "ListPartnerships", 
            path: "/partnerships", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the partnerships associated with your Amazon Web Services account for your current or specified region. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    ///
    /// Parameters:
    ///   - maxResults: Specifies the maximum number of capabilities to return.
    ///   - nextToken: When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.
    ///   - profileId: Specifies the unique, system-generated identifier for the profile connected to this partnership.
    ///   - logger: Logger use during operation
    @inlinable
    public func listPartnerships(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        profileId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListPartnershipsResponse {
        let input = ListPartnershipsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            profileId: profileId
        )
        return try await self.listPartnerships(input, logger: logger)
    }

    /// Lists the profiles associated with your Amazon Web Services account for your current or specified region. A profile is the mechanism used to create the concept of a private network.
    @Sendable
    @inlinable
    public func listProfiles(_ input: ListProfilesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListProfilesResponse {
        try await self.client.execute(
            operation: "ListProfiles", 
            path: "/profiles", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the profiles associated with your Amazon Web Services account for your current or specified region. A profile is the mechanism used to create the concept of a private network.
    ///
    /// Parameters:
    ///   - maxResults: Specifies the maximum number of profiles to return.
    ///   - nextToken: When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.
    ///   - logger: Logger use during operation
    @inlinable
    public func listProfiles(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListProfilesResponse {
        let input = ListProfilesRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listProfiles(input, logger: logger)
    }

    /// Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a capability, partnership, profile, or transformer.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{ResourceARN}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a capability, partnership, profile, or transformer.
    ///
    /// Parameters:
    ///   - resourceARN: Requests the tags associated with a particular Amazon Resource Name (ARN). An ARN is an identifier for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceARN: resourceARN
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Lists the available transformers. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
    @Sendable
    @inlinable
    public func listTransformers(_ input: ListTransformersRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTransformersResponse {
        try await self.client.execute(
            operation: "ListTransformers", 
            path: "/transformers", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the available transformers. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
    ///
    /// Parameters:
    ///   - maxResults: Specifies the number of items to return for the API response.
    ///   - nextToken: When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTransformers(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTransformersResponse {
        let input = ListTransformersRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listTransformers(input, logger: logger)
    }

    /// Runs a job, using a transformer, to parse input EDI (electronic data interchange) file into the output structures used by Amazon Web Services B2B Data Interchange. If you only want to transform EDI (electronic data interchange) documents, you don't need to create profiles, partnerships or capabilities. Just create and configure a transformer, and then run the StartTransformerJob API to process your files.  The system stores transformer jobs for 30 days. During that period, you can run GetTransformerJob and supply its transformerId and transformerJobId to return details of the job.
    @Sendable
    @inlinable
    public func startTransformerJob(_ input: StartTransformerJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartTransformerJobResponse {
        try await self.client.execute(
            operation: "StartTransformerJob", 
            path: "/transformer-jobs", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Runs a job, using a transformer, to parse input EDI (electronic data interchange) file into the output structures used by Amazon Web Services B2B Data Interchange. If you only want to transform EDI (electronic data interchange) documents, you don't need to create profiles, partnerships or capabilities. Just create and configure a transformer, and then run the StartTransformerJob API to process your files.  The system stores transformer jobs for 30 days. During that period, you can run GetTransformerJob and supply its transformerId and transformerJobId to return details of the job.
    ///
    /// Parameters:
    ///   - clientToken: Reserved for future use.
    ///   - inputFile: Specifies the location of the input file for the transformation. The location consists of an Amazon S3 bucket and prefix.
    ///   - outputLocation: Specifies the location of the output file for the transformation. The location consists of an Amazon S3 bucket and prefix.
    ///   - transformerId: Specifies the system-assigned unique identifier for the transformer.
    ///   - logger: Logger use during operation
    @inlinable
    public func startTransformerJob(
        clientToken: String? = StartTransformerJobRequest.idempotencyToken(),
        inputFile: S3Location,
        outputLocation: S3Location,
        transformerId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartTransformerJobResponse {
        let input = StartTransformerJobRequest(
            clientToken: clientToken, 
            inputFile: inputFile, 
            outputLocation: outputLocation, 
            transformerId: transformerId
        )
        return try await self.startTransformerJob(input, logger: logger)
    }

    /// Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities. There is no response returned from this call.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{ResourceARN}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities. There is no response returned from this call.
    ///
    /// Parameters:
    ///   - resourceARN: Specifies an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
    ///   - tags: Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceARN: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = TagResourceRequest(
            resourceARN: resourceARN, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// This operation mimics the latter half of a typical Outbound EDI request. It takes an input JSON/XML in the B2Bi shape as input, converts it to an X12 EDI string, and return that string.
    @Sendable
    @inlinable
    public func testConversion(_ input: TestConversionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TestConversionResponse {
        try await self.client.execute(
            operation: "TestConversion", 
            path: "/testconversion", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// This operation mimics the latter half of a typical Outbound EDI request. It takes an input JSON/XML in the B2Bi shape as input, converts it to an X12 EDI string, and return that string.
    ///
    /// Parameters:
    ///   - source: Specify the source file for an outbound EDI request.
    ///   - target: Specify the format (X12 is the only currently supported format), and other details for the conversion target.
    ///   - logger: Logger use during operation
    @inlinable
    public func testConversion(
        source: ConversionSource,
        target: ConversionTarget,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TestConversionResponse {
        let input = TestConversionRequest(
            source: source, 
            target: target
        )
        return try await self.testConversion(input, logger: logger)
    }

    /// Maps the input file according to the provided template file. The API call downloads the file contents from the Amazon S3 location, and passes the contents in as a string, to the inputFileContent parameter.
    @Sendable
    @inlinable
    public func testMapping(_ input: TestMappingRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TestMappingResponse {
        try await self.client.execute(
            operation: "TestMapping", 
            path: "/testmapping", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Maps the input file according to the provided template file. The API call downloads the file contents from the Amazon S3 location, and passes the contents in as a string, to the inputFileContent parameter.
    ///
    /// Parameters:
    ///   - fileFormat: Specifies that the currently supported file formats for EDI transformations are JSON and XML.
    ///   - inputFileContent: Specify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.
    ///   - mappingTemplate: Specifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.  This parameter is available for backwards compatibility. Use the Mapping data type instead.
    ///   - logger: Logger use during operation
    @inlinable
    public func testMapping(
        fileFormat: FileFormat,
        inputFileContent: String,
        mappingTemplate: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TestMappingResponse {
        let input = TestMappingRequest(
            fileFormat: fileFormat, 
            inputFileContent: inputFileContent, 
            mappingTemplate: mappingTemplate
        )
        return try await self.testMapping(input, logger: logger)
    }

    /// Parses the input EDI (electronic data interchange) file. The input file has a file size limit of 250 KB.
    @Sendable
    @inlinable
    public func testParsing(_ input: TestParsingRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TestParsingResponse {
        try await self.client.execute(
            operation: "TestParsing", 
            path: "/testparsing", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Parses the input EDI (electronic data interchange) file. The input file has a file size limit of 250 KB.
    ///
    /// Parameters:
    ///   - advancedOptions: Specifies advanced options for parsing the input EDI file. These options allow for more granular control over the parsing process, including split options for X12 files.
    ///   - ediType: Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
    ///   - fileFormat: Specifies that the currently supported file formats for EDI transformations are JSON and XML.
    ///   - inputFile: Specifies an S3Location object, which contains the Amazon S3 bucket and prefix for the location of the input file.
    ///   - logger: Logger use during operation
    @inlinable
    public func testParsing(
        advancedOptions: AdvancedOptions? = nil,
        ediType: EdiType,
        fileFormat: FileFormat,
        inputFile: S3Location,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TestParsingResponse {
        let input = TestParsingRequest(
            advancedOptions: advancedOptions, 
            ediType: ediType, 
            fileFormat: fileFormat, 
            inputFile: inputFile
        )
        return try await self.testParsing(input, logger: logger)
    }

    /// Detaches a key-value pair from the specified resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{ResourceARN}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Detaches a key-value pair from the specified resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities.
    ///
    /// Parameters:
    ///   - resourceARN: Specifies an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
    ///   - tagKeys: Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceARN: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UntagResourceRequest(
            resourceARN: resourceARN, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates some of the parameters for a capability, based on the specified parameters. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    @Sendable
    @inlinable
    public func updateCapability(_ input: UpdateCapabilityRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateCapabilityResponse {
        try await self.client.execute(
            operation: "UpdateCapability", 
            path: "/capabilities/{capabilityId}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates some of the parameters for a capability, based on the specified parameters. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.
    ///
    /// Parameters:
    ///   - capabilityId: Specifies a system-assigned unique identifier for the capability.
    ///   - configuration: Specifies a structure that contains the details for a capability.
    ///   - instructionsDocuments: Specifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document's location.
    ///   - name: Specifies a new name for the capability, to replace the existing name.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateCapability(
        capabilityId: String,
        configuration: CapabilityConfiguration? = nil,
        instructionsDocuments: [S3Location]? = nil,
        name: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateCapabilityResponse {
        let input = UpdateCapabilityRequest(
            capabilityId: capabilityId, 
            configuration: configuration, 
            instructionsDocuments: instructionsDocuments, 
            name: name
        )
        return try await self.updateCapability(input, logger: logger)
    }

    /// Updates some of the parameters for a partnership between a customer and trading partner. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    @Sendable
    @inlinable
    public func updatePartnership(_ input: UpdatePartnershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdatePartnershipResponse {
        try await self.client.execute(
            operation: "UpdatePartnership", 
            path: "/partnerships/{partnershipId}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates some of the parameters for a partnership between a customer and trading partner. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
    ///
    /// Parameters:
    ///   - capabilities: List of the capabilities associated with this partnership.
    ///   - capabilityOptions: To update, specify the structure that contains the details for the associated capabilities.
    ///   - name: The name of the partnership, used to identify it.
    ///   - partnershipId: Specifies the unique, system-generated identifier for a partnership.
    ///   - logger: Logger use during operation
    @inlinable
    public func updatePartnership(
        capabilities: [String]? = nil,
        capabilityOptions: CapabilityOptions? = nil,
        name: String? = nil,
        partnershipId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdatePartnershipResponse {
        let input = UpdatePartnershipRequest(
            capabilities: capabilities, 
            capabilityOptions: capabilityOptions, 
            name: name, 
            partnershipId: partnershipId
        )
        return try await self.updatePartnership(input, logger: logger)
    }

    /// Updates the specified parameters for a profile. A profile is the mechanism used to create the concept of a private network.
    @Sendable
    @inlinable
    public func updateProfile(_ input: UpdateProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateProfileResponse {
        try await self.client.execute(
            operation: "UpdateProfile", 
            path: "/profiles/{profileId}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the specified parameters for a profile. A profile is the mechanism used to create the concept of a private network.
    ///
    /// Parameters:
    ///   - businessName: Specifies the name for the business associated with this profile.
    ///   - email: Specifies the email address associated with this customer profile.
    ///   - name: The name of the profile, used to identify it.
    ///   - phone: Specifies the phone number associated with the profile.
    ///   - profileId: Specifies the unique, system-generated identifier for the profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateProfile(
        businessName: String? = nil,
        email: String? = nil,
        name: String? = nil,
        phone: String? = nil,
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateProfileResponse {
        let input = UpdateProfileRequest(
            businessName: businessName, 
            email: email, 
            name: name, 
            phone: phone, 
            profileId: profileId
        )
        return try await self.updateProfile(input, logger: logger)
    }

    /// Updates the specified parameters for a transformer. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
    @Sendable
    @inlinable
    public func updateTransformer(_ input: UpdateTransformerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateTransformerResponse {
        try await self.client.execute(
            operation: "UpdateTransformer", 
            path: "/transformers/{transformerId}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the specified parameters for a transformer. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.
    ///
    /// Parameters:
    ///   - inputConversion: To update, specify the InputConversion object, which contains the format options for the inbound transformation.
    ///   - mapping: Specify the structure that contains the mapping template and its language (either XSLT or JSONATA).
    ///   - name: Specify a new name for the transformer, if you want to update it.
    ///   - outputConversion: To update, specify the OutputConversion object, which contains the format options for the outbound transformation.
    ///   - sampleDocuments: Specify a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.
    ///   - status: Specifies the transformer's status. You can update the state of the transformer from inactive to active.
    ///   - transformerId: Specifies the system-assigned unique identifier for the transformer.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateTransformer(
        inputConversion: InputConversion? = nil,
        mapping: Mapping? = nil,
        name: String? = nil,
        outputConversion: OutputConversion? = nil,
        sampleDocuments: SampleDocuments? = nil,
        status: TransformerStatus? = nil,
        transformerId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateTransformerResponse {
        let input = UpdateTransformerRequest(
            inputConversion: inputConversion, 
            mapping: mapping, 
            name: name, 
            outputConversion: outputConversion, 
            sampleDocuments: sampleDocuments, 
            status: status, 
            transformerId: transformerId
        )
        return try await self.updateTransformer(input, logger: logger)
    }
}

extension B2bi {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: B2bi, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension B2bi {
    /// Return PaginatorSequence for operation ``listCapabilities(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listCapabilitiesPaginator(
        _ input: ListCapabilitiesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListCapabilitiesRequest, ListCapabilitiesResponse> {
        return .init(
            input: input,
            command: self.listCapabilities,
            inputKey: \ListCapabilitiesRequest.nextToken,
            outputKey: \ListCapabilitiesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listCapabilities(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: Specifies the maximum number of capabilities to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listCapabilitiesPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListCapabilitiesRequest, ListCapabilitiesResponse> {
        let input = ListCapabilitiesRequest(
            maxResults: maxResults
        )
        return self.listCapabilitiesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listPartnerships(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listPartnershipsPaginator(
        _ input: ListPartnershipsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListPartnershipsRequest, ListPartnershipsResponse> {
        return .init(
            input: input,
            command: self.listPartnerships,
            inputKey: \ListPartnershipsRequest.nextToken,
            outputKey: \ListPartnershipsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listPartnerships(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: Specifies the maximum number of capabilities to return.
    ///   - profileId: Specifies the unique, system-generated identifier for the profile connected to this partnership.
    ///   - logger: Logger used for logging
    @inlinable
    public func listPartnershipsPaginator(
        maxResults: Int? = nil,
        profileId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListPartnershipsRequest, ListPartnershipsResponse> {
        let input = ListPartnershipsRequest(
            maxResults: maxResults, 
            profileId: profileId
        )
        return self.listPartnershipsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listProfiles(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfilesPaginator(
        _ input: ListProfilesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListProfilesRequest, ListProfilesResponse> {
        return .init(
            input: input,
            command: self.listProfiles,
            inputKey: \ListProfilesRequest.nextToken,
            outputKey: \ListProfilesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listProfiles(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: Specifies the maximum number of profiles to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfilesPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListProfilesRequest, ListProfilesResponse> {
        let input = ListProfilesRequest(
            maxResults: maxResults
        )
        return self.listProfilesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listTransformers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listTransformersPaginator(
        _ input: ListTransformersRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListTransformersRequest, ListTransformersResponse> {
        return .init(
            input: input,
            command: self.listTransformers,
            inputKey: \ListTransformersRequest.nextToken,
            outputKey: \ListTransformersResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listTransformers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: Specifies the number of items to return for the API response.
    ///   - logger: Logger used for logging
    @inlinable
    public func listTransformersPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListTransformersRequest, ListTransformersResponse> {
        let input = ListTransformersRequest(
            maxResults: maxResults
        )
        return self.listTransformersPaginator(input, logger: logger)
    }
}

extension B2bi.ListCapabilitiesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> B2bi.ListCapabilitiesRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension B2bi.ListPartnershipsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> B2bi.ListPartnershipsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            profileId: self.profileId
        )
    }
}

extension B2bi.ListProfilesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> B2bi.ListProfilesRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension B2bi.ListTransformersRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> B2bi.ListTransformersRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

// MARK: Waiters

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension B2bi {
    /// Waiter for operation ``getTransformerJob(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilTransformerJobSucceeded(
        _ input: GetTransformerJobRequest,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<GetTransformerJobRequest, _>(
            acceptors: [
                .init(state: .success, matcher: try! JMESPathMatcher("status", expected: "succeeded")),
                .init(state: .failure, matcher: try! JMESPathMatcher("status", expected: "failed")),
            ],
            minDelayTime: .seconds(10),
            command: self.getTransformerJob
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``getTransformerJob(_:logger:)``.
    ///
    /// - Parameters:
    ///   - transformerId: Specifies the system-assigned unique identifier for the transformer.
    ///   - transformerJobId: Specifies the unique, system-generated identifier for a transformer run.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilTransformerJobSucceeded(
        transformerId: String,
        transformerJobId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = GetTransformerJobRequest(
            transformerId: transformerId, 
            transformerJobId: transformerJobId
        )
        try await self.waitUntilTransformerJobSucceeded(input, logger: logger)
    }
}
